/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package z.h.w.jar.data.tree;

import java.io.Serializable;
import java.util.Map;
import z.h.w.jar.kit.ex.CanNotFindException;

/**
 * 
 * @author EnzoZhong
 * @param <Type>
 */
public interface Tree<Type> extends Serializable , Iterable<Map<Object , Object>> {

   /**
    * 
    * @param val
    * @param path
    * @return
    * @throws CanNotFindException
    */
   Tree<Type> add ( Type val , Type... path ) throws CanNotFindException;

   /**
    * 
    * @param path
    * @return
    * @throws CanNotFindException
    */
   Tree<Type> get ( Type... path ) throws CanNotFindException;

   /**
    * 
    * @param path
    * @return
    */
   Boolean has ( Type... path );

   /**
    * 
    * @param path
    * @return
    */
   Boolean del ( Type... path );

   /**
    * 
    * @return
    */
   Boolean hasUp ();

   /**
    * 
    * @return
    */
   Type getVal ();

   /**
    * 
    * @return
    */
   Tree<Type> getUp ();
}
